package io;

import java.io.*;

public class PWDemo2 {
    public static void main(String[] args) throws FileNotFoundException {
        File file = new File("pw2.txt");
        FileOutputStream fos = new FileOutputStream(file);//文件输出流
        OutputStreamWriter osw = new OutputStreamWriter(fos);//缓冲输出流
        BufferedWriter bfw = new BufferedWriter(osw);//字符转换流
        PrintWriter pw = new PrintWriter(bfw);//PrintWriter流
        pw.println("haha");
        pw.println("111");
        System.out.println("写出完毕");
        pw.close();
    }
}
